package com.hanhai.material.device.service;

import com.hanhai.material.common.result.Result;
import com.hanhai.material.device.entity.SysProductRecordInto;
import com.hanhai.material.scheduling.entity.SysProductPeople;
import org.springframework.scheduling.annotation.Async;

import java.io.IOException;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Future;

/**
 * @author Administrator
 */
public interface AsyncService {
    @Async("taskExecutor")
    Future<Result<?>> saveProductRecordIntoByAsync(SysProductRecordInto productRecordInto, CountDownLatch countDownLatch) throws IOException;
  @Async("taskExecutor")
    Future<Result<?>> saveProductRecordIntoByAsyncList(List<SysProductRecordInto> productRecordIntoList, CountDownLatch countDownLatch) throws IOException;

    @Async("taskExecutor")
    Future<Result<?>> updateProductRecordIntoByAsync(SysProductRecordInto productRecordInto, CountDownLatch countDownLatch) throws IOException;

    @Async("taskExecutor")
    Future<Result<?>> saveProductPeopleBatch(List<SysProductPeople> productPeopleList,CountDownLatch countDownLatch);
    @Async("taskExecutor")
    Future<Result<?>> getHistoryPeople(List<SysProductPeople> productPeopleList,CountDownLatch countDownLatch);

}
